@extends('admin.master')

@section('style')
	<link rel="stylesheet" href="{{ url('css/bootstrap-datetimepicker.css') }}">
@endsection

@section('top')
<div class="top-breadcrumb pull-left">{!! Breadcrumbs::render('progress-tongji') !!}</div>
@endsection

@section('content')
<div class="section-search mb10">
{!! Form::model($where, ['method'=>'get', 'class'=>'form-inline']) !!}
	<div class="form-group">
		<label class="control-label">开始时间：</label>
		<div class="form-datetime datetime-search len150">
			{!! Form::text('start', $where['start'], ['class'=>'form-control len150 datetimepicker-start', 'data-date-format'=>'yyyy-mm-dd']) !!}
			<i class="icon icon-date"></i>
		</div>
	</div>
	<div class="form-group">
		<label class="control-label">结束时间：</label>
		<div class="form-datetime datetime-search len150">
			{!! Form::text('end', $where['end'], ['class'=>'form-control len150 datetimepicker-end', 'data-date-format'=>'yyyy-mm-dd']) !!}
			<i class="icon icon-date"></i>
		</div>
	</div>
	<button type="submit" class="btn btn-default">查询</button>
{!! Form::close() !!}
</div>
	<div class="main-view">
		<div class="row">
			<div class="col-md-4">
				<div class="partition"><span>网站订单</span></div>
				<table class="table" action="{{ url('admin/order/progress/web') }}">
					<thead>
						<th width="80">设计师</th>
						<th class="text-center">下单</th>
						<th class="text-center">验收</th>			
						<th class="text-center">发布</th>			
						<th class="text-center">录入完成</th>		
					</thead>
					<tbody>
					@foreach($designers as $value)
					<tr>
						<td>{{ $value->name }}</td>
						<td class="text-center">{{ $tongji->order->get($value->id, 0) }}</td>
						<td class="text-center">{{ $tongji->product->get($value->id, 0) }}</td>
						<td class="text-center">{{ $tongji->finish->get($value->id, 0) }}</td>
						<td class="text-center">{{ $tongji->input->get($value->id, 0) }}</td>
					</tr>
					@endforeach
					</tbody>
				</table>
			</div>
			<div class="col-md-4">
				<div class="partition"><span>通用订单</span></div>
				<table class="table">
					<thead>
						<th width="80">设计师</th>
						<th class="text-center">下单</th>
						<th class="text-center">已完成</th>					
					</thead>
					<tbody>
					@foreach($designers as $value)
					<tr>
						<td>{{ $value->name }}</td>
						<td class="text-center">{{ $tongji->order_common->get($value->id, 0) }}</td>
						<td class="text-center">{{ $tongji->finish_common->get($value->id, 0) }}</td>
					</tr>
					@endforeach
					</tbody>
				</table>
			</div>
			<div class="col-md-4">
				<div class="partition"><span>其他订单</span></div>
				<table class="table">
					<thead>
						<th width="80">设计师</th>
						<th class="text-center">下单</th>
						<th class="text-center">完成</th>					
					</thead>
					<tbody>
					@foreach($designers as $value)
					<tr>
						<td>{{ $value->name }}</td>
						<td class="text-center">{{ $tongji->order_other->get($value->id, 0) }}</td>
						<td class="text-center">{{ $tongji->finish_other->get($value->id, 0) }}</td>
					</tr>
					@endforeach
					</tbody>
				</table>
			</div>
		</div>
	</div>
@endsection

@section('foot')
<script src="{{ url('js/bootstrap-datetimepicker.js') }}"></script>
<script>
	$('.datetimepicker-start').datetimepicker({
		language: 'zh-CN',
		autoclose: true,
		weekStart: 1,
		minView: 'month'
	});
	$('.datetimepicker-end').datetimepicker({
		language: 'zh-CN',
		autoclose: true,
		weekStart: 1,
		minView: 'month'
	});
</script>
</script>	
@endsection